#include "s3c24xx.h"

void EINT_Handle()
{
	unsigned long oft = INTOFFSET;
	unsigned long val;

	switch( oft )
	{
		case 0:
			GPFDAT &= ~(0x40); 
			break;

		case 2:
			GPFDAT &= ~(0x20);
			break;

		case 5:
			val = EINTPEND;
			if (val & (1<<11))
				GPFDAT &= ~(0x10);
			if (val & (1<<19))
				GPFDAT |= (0x70);

			break;

		default:
			break;
	}

	//清中断
	if( oft == 5 ) 
		EINTPEND = (1<<11) | (1<<19);   // EINT8_23合用IRQ5
	SRCPND = 1<<oft;
	INTPND = 1<<oft;
}

